From 7bf4906ead5d339018b26eee2015b921850fdb76 Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Thu, 9 Jun 2005 14:43:55 +0000 Subject: [PATCH] bitkeeper revision 1.1668.1.6 (42a855abmDUqg5YrgIMWSBLOJP_HYg) Fast reflecting now working for breaks Signed-off by: Dan Magenheimer --- xen/arch/ia64/hyperprivop.S | 14 +++++++++++++- xen/arch/ia64/patch/linux-2.6.11/efi.c | 12 ++++++++---- xen/arch/ia64/process.c | 14 ++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/xen/arch/ia64/hyperprivop.S b/xen/arch/ia64/hyperprivop.S index 8f8497a22f..6903c66782 100644 --- a/xen/arch/ia64/hyperprivop.S +++ b/xen/arch/ia64/hyperprivop.S @@ -221,7 +221,7 @@ ENTRY(hyper_ssm_i) // r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits) // r31 == pr GLOBAL_ENTRY(fast_break_reflect) -//#define FAST_BREAK +#define FAST_BREAK #ifndef FAST_BREAK br.sptk.many dispatch_break_fault ;; #endif @@ -233,6 +233,18 @@ GLOBAL_ENTRY(fast_break_reflect) extr.u r21=r30,IA64_PSR_PP_BIT,1 ;; cmp.ne p7,p0=r21,r0 ;; (p7) br.sptk.many dispatch_break_fault ;; +#if 1 /* special handling in case running on simulator */ + movl r20=first_break;; + ld4 r23=[r20];; + movl r21=0x80001; + movl r22=0x80002;; + cmp.ne p7,p0=r23,r0;; +(p7) br.sptk.many dispatch_break_fault ;; + cmp.eq p7,p0=r21,r17; +(p7) br.sptk.many dispatch_break_fault ;; + cmp.eq p7,p0=r22,r17; +(p7) br.sptk.many dispatch_break_fault ;; +#endif #ifdef FAST_REFLECT_CNT movl r20=fast_reflect_count+((0x2c00>>8)*8);; ld8 r21=[r20];; diff --git a/xen/arch/ia64/patch/linux-2.6.11/efi.c b/xen/arch/ia64/patch/linux-2.6.11/efi.c index 9b85e43649..e79d178edc 100644 --- a/xen/arch/ia64/patch/linux-2.6.11/efi.c +++ b/xen/arch/ia64/patch/linux-2.6.11/efi.c @@ -1,19 +1,23 @@ --- ../../linux-2.6.11/arch/ia64/kernel/efi.c 2005-03-02 00:37:47.000000000 -0700 -+++ arch/ia64/efi.c 2005-06-08 20:23:39.000000000 -0600 -@@ -320,6 +320,12 @@ ++++ arch/ia64/efi.c 2005-06-09 06:15:36.000000000 -0600 +@@ -320,6 +320,16 @@ if (!(md->attribute & EFI_MEMORY_WB)) continue; +#ifdef XEN +// this works around a problem in the ski bootloader -+ if (md->type != EFI_CONVENTIONAL_MEMORY) continue; ++{ ++ extern long running_on_sim; ++ if (running_on_sim && md->type != EFI_CONVENTIONAL_MEMORY) ++ continue; ++} +// this is a temporary hack to avoid CONFIG_VIRTUAL_MEM_MAP + if (md->phys_addr >= 0x100000000) continue; +#endif /* * granule_addr is the base of md's first granule. * [granule_addr - first_non_wb_addr) is guaranteed to -@@ -719,6 +725,30 @@ +@@ -719,6 +729,30 @@ return 0; } diff --git a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c index 826aae9380..dfcba767ab 100644 --- a/xen/arch/ia64/process.c +++ b/xen/arch/ia64/process.c @@ -774,18 +774,19 @@ if (!running_on_sim) { printf("SSC_OPEN, not implemented on hardware. (ignoring vcpu_increment_iip(current); } +int first_break = 1; + void ia64_handle_break (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim) { - static int first_time = 1; struct domain *d = (struct domain *) current->domain; struct vcpu *v = (struct domain *) current; extern unsigned long running_on_sim; - if (first_time) { + if (first_break) { if (platform_is_hp_ski()) running_on_sim = 1; else running_on_sim = 0; - first_time = 0; + first_break = 0; } if (iim == 0x80001 || iim == 0x80002) { //FIXME: don't hardcode constant if (running_on_sim) do_ssc(vcpu_get_gr(current,36), regs); @@ -821,6 +822,8 @@ ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr, #define INTR_TYPE_MAX 10 UINT64 int_counts[INTR_TYPE_MAX]; +void dis_foo(void) { } + void ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim, unsigned long vector) { @@ -854,7 +857,10 @@ ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long i check_lazy_cover = 1; vector = IA64_DATA_ACCESS_RIGHTS_VECTOR; break; case 25: - vector = IA64_DISABLED_FPREG_VECTOR; break; + vector = IA64_DISABLED_FPREG_VECTOR; +//printf("*** Attempting to handle disabled_fpreg\n"); + dis_foo(); + break; case 26: printf("*** NaT fault... attempting to handle as privop\n"); vector = priv_emulate(v,regs,isr); -- 2.30.2